package com.wyh.common.enums;

import lombok.Getter;

/**
 * <p>
 * 返回值代码类
 * </p>
 *
 * @author 骸音
 * @since 2024-5-14
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS("200", "成功"),
    TYPE_ERROR("200", "没有对应的类型"),
    ADD_SUCCESS("200", "添加成功"),
    UPDATE_SUCCESS("200", "修改成功"),
    ORGANIZATION_REMOVE_SUCCESS("200", "删除成功"),
    REPLACEED_SUCCESS("200", "换表成功"),


    PARAM_ERROR("400", "参数异常"),
    STATE_ERROR("400", "状态异常"),
    INPUT_RULE_ERROR("402", "参数输入格式错误"),
    TOKEN_INVALID_ERROR("401", "无效的token"),
    TOKEN_CHECK_ERROR("401", "token验证失败，请重新登录"),
    PARAM_LOST_ERROR("4001", "参数缺失"),
    RESOURCE_NOT_ERROR("700", "没有资源"),
    CUSTOMER_NOT_ERROR("700", "没有客户"),
    DATA_NOT_ERROR("700", "没有该需要挂账认领的客户"),
    THREEMETERREADING_NOT_ERROR("700","没有该抄表记录"),
    THREEMETER_NOT_ERROR("700","没有该表或该表已失效"),

    SECURITY_AUTHENTICATION_FAILURE("403", "安全权限认证失败"),


    KEYWORDS_ERROR("200", "没有任何的相关内容"),


    SYSTEM_ERROR("500", "系统异常"),
    USER_EXIST_ERROR("5001", "用户名已存在"),
    USER_NOT_LOGIN("5002", "用户未登录"),
    USER_ACCOUNT_ERROR("5003", "账号或密码错误"),
    USER_NOT_EXIST_ERROR("5004", "用户不存在"),
    PARAM_PASSWORD_ERROR("5005", "原密码输入错误"),
    PHONE_ERROR("5006", "手机号参数错误"),
    USER_LOCKED_ERROR("5007", "账户锁定"),
    EXCESS_AMOUNT("5008", "超出未开票金额"),
    CAPTCHA_ERROR("6001", "短信验证码错误"),
    CAPTCHA_OVERDUE("6002", "短信验证码过期"),
    // organization
    ORGANIZATION_ADD_ERROR("7001", "添加失败"),
    ORGANIZATION_STATE_ERROR("7008", "该组织已停用"),
    ORGANIZATION_FIND_ERROR("7003", "获取数据失败"),
    ORGANIZATION_ADD_NULL_ERROR("7002", "新增的数据为空"),
    ORGANIZATION_ADD_NAME_NULL_ERROR("7014", "新增的名字为空"),
    ORGANIZATION_UPDATE_NULL_ERROR("7005", "修改的数据为空"),
    ORGANIZATION_UPDATE_ERROR("7006", "修改失败"),
    ORGANIZATION_DELETE_ERROR("7008", "删除失败"),
    ORGANIZATION_NULL_ERROR("7004", "该上级组织不存在"),
    OPERATION_AUTHORITY_ERROR("7001", "您没有权限进行此操作"),
    ORGANIZATION_AUTHORITY_ERROR("7009", "您没有权限查看此组织的信息"),
    ORGANIZATION_REMOVE_ERROR("7010", "删除失败"),
    ORGANIZATION_REMOVE_REMAIN_ERROR("7011", "该组织下有下级组织，无法删除"),
    ORGANIZATION_REMOVE_REMAIN_PROJECT_ERROR("7012", "该组织有关联的项目，无法删除"),
    ORGANIZATION_USER_ERROR("7013", "该组织下没有任何账号信息"),
    ORGANIZATION_DOWN_NULL_ERROR("7014", "该组织下不存在下级组织"),
    CREDITCODE_HAS_EXISTED("7015", "统一信用编码已存在，请换一个"),

    //project
    PROJECT_FIND_ERROR("400", "暂无数据"),
    PROJECT_ADD_ERROR("400","添加失败"),
    PROJECT_ADD_SUCCESS("200","添加成功" ),
    PROJECT_NAME_EXIST("200","数据已经存在" ),
    PROJECT_NULL_ID_ERROR("200", "被点击的节点没有节点id"),
    PROJECT_PARENT_NULL_ERROR("200","上级组织不存在"),
    PROJECT_FIND_ALL_SUCCESS("200","查询成功" ),
    PROJECT_UPDATE_ERROR("400","数据修改失败"),
    PROJECT_UPDATE_SUCCESS("200","数据修改成功"),
    PROJECT_DELETE_SUCCESS("200","删除成功"),
    PROJECT_DELETE_ERROR("400","删除失败"),
    PROJECT_UPDATE_PARENT_STATE("400","下级有资源没有被停用"),
    PROJECT_UPDATE_NULL_ERROR("400", "该数据不存在"),
    PROJECT_NOT_FOUND("700","没有管理楼盘" );

    public String code;
    public String msg;

    ResultCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
